
package fileby.ctrl.actions.impl;

import fileby.model.IClipboardManager;
import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import javax.swing.AbstractAction;
import javax.swing.KeyStroke;

/**
 *
 * @author Jacob
 */
class PasteAction extends AbstractAction {

    private IClipboardManager clipboardManager;

     public PasteAction(IClipboardManager clipboardManager) {
        super("Paste", null);
        this.clipboardManager = clipboardManager;
        putValue(SHORT_DESCRIPTION, "Paste files from clipboard");
        putValue(MNEMONIC_KEY, KeyEvent.VK_P);
        putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK));
    }

    public void actionPerformed(ActionEvent e) {
            clipboardManager.paste();
    }

}
